<!-- ControlComponents, begin -->
<?php
  $moduleName = sfContext::getInstance()->getRequest()->getParameter("module");
  $subModuleName = $moduleName."Item";
  $objMainModuleTableFields = WacModuleHelper::getModuleTableFields($moduleName);
  $objSubModuleTableFields = WacModuleHelper::getModuleTableFields($subModuleName);
  $arrType = sfContext::getInstance()->getRequest()->getParameter("type");
  $attachName = ucfirst($arrType["name"]).ucfirst(StaticWacFormStatus::$audited);
  $modelListName = ($arrType["name"] == WacBizOrderType::$type["dye"]["name"]) ? WacControlTableType::$modelListingTableA.$arrType["name"] : WacControlTableType::$modelListingTableA;

  echo "<div id=\"".WacModuleHelper::getComponentsId($moduleName, $attachName)."\">\n\n";

  // module buttons bar
  include_component('common', 'controlTable1',
              array( 'partial'      => WacModule::getName("common")."/".WacControlTableType::$moduleButtonBar,
                     'invokeParams' => array(
                                           'moduleName' => $moduleName,
                                           'caption'    => WacModule::getCaption($moduleName),
                                           'attachName' => $attachName
                                           )
                  ));

  // model list
  include_component('common', 'controlTable1',
              array( 'partial'      => $moduleName."/".$modelListName,
                     'invokeParams' => array(
                                           'moduleName' => $moduleName,
                                           'subItemModuleName' => $subModuleName,
                                           'caption'    => WacModule::getCaption($moduleName),
                                           'objMainModuleTableFields' => $objMainModuleTableFields,  // return sfOutputEscaperArrayDecorator
                                           'objSubModuleTableFields' => $objSubModuleTableFields,  // return sfOutputEscaperArrayDecorator
                                           'attachName' => $attachName,
                                           'method'     => "getList/type_code/{$arrType["code"]}/status/".StaticWacFormStatus::$audited
                                           )
                  ));


  echo "</div>\n\n";
?>
<!-- ControlComponents, end -->